package com.xlhj.session.controller;

import com.xlhj.session.entity.SysUser;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * @ClassName UserController
 * @Description TODO
 * @Author liucaijing
 * @Date 2021/2/26 15:29
 * @Version 1.0
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @PostMapping("/saveUser")
    public SysUser saveUser(SysUser user, HttpSession session) {
        session.setAttribute("user", user);
        return new SysUser();
    }
}
